package ar.com.telefonica.fwk.impl;

import ar.com.telefonica.fwk.Persistent;

public abstract class AbstractPersistent implements Persistent{

	private Integer id;

	@Override
	public Integer getId() {
		return this.id;
	}

	protected void setId(Integer id) {
		this.id = id;
	}
	
	public final void doSave(){
		this.doValidate();
		this.save();
	}
	
	protected abstract void save();
	
	protected void doValidate(){};
}